<!--
 * @Author: chenzechao
 * @Date: 2024-01-26 14:13:34
 * @LastEditors: chenzechao
 * @LastEditTime: 2024-02-05 16:17:06
 * @FilePath: \accesscontrolui\src\views\kqgl\kqtj\components\list.vue
 * @Description: 
-->
<template>
  <div>
    <el-table
      stripe
      :header-cell-style="{ 'background-color': 'rgba(201, 215, 242, 1)' }"
      :data="dataList"
    >
      <el-table-column prop="name" label="日期范围"> </el-table-column>
      <el-table-column prop="name" label="姓名"> </el-table-column>
      <el-table-column prop="name" label="组织分组"> </el-table-column>
      <template v-if="listType == 'free'">
        <el-table-column prop="name" label="应出勤时长(小时）">
        </el-table-column>
        <el-table-column prop="name" label="实际出勤时长(小时）">
        </el-table-column>
        <el-table-column prop="name" label="旷工次数"> </el-table-column>
        <el-table-column prop="name" label="加班时长(小时）"> </el-table-column>
      </template>

      <template v-if="listType == 'fixed'">
        <el-table-column prop="name" label="应出勤天数"> </el-table-column>
        <el-table-column prop="name" label="正常出勤天数"> </el-table-column>
        <el-table-column prop="name" label="异常出勤天数"> </el-table-column>
        <el-table-column prop="name" label="总出勤时长（小时）" width="150px">
        </el-table-column>
        <el-table-column prop="name" label="加班时长（小时）" width="150px">
        </el-table-column>
        <el-table-column
          width="150px"
          prop="name"
          label="平均上班时长（小时）"
        ></el-table-column>
      </template>
      <el-table-column prop="name" label="操作">
        <template slot-scope="{ row }">
          <i class="icon icon-eye" @click="preview"></i>
        </template>
      </el-table-column>
    </el-table>
    <Pagination :total="0">
      <el-button
        size="small"
        @click="handleImport"
        type="handle"
        ><i class="icon-upload icon"></i> 导出</el-button
      >
    </Pagination>
    <attendance-record ref="attendanceRef" />
  </div>
</template>
<script>
import Pagination from "@/components/Pagination/index.vue";
import AttendanceRecord from "./attendance-record.vue";
export default {
  components: {
    Pagination,
    AttendanceRecord,
  },
  props: {
    listType: {
      type: String,
      default: "free",
    },
  },
  data() {
    return {
      dataList: [
        { name: "2323" },
        { name: "2323" },
        { name: "2323" },
        { name: "2323" },
      ],
    };
  },
  methods: {
    handleImport() {},
    preview() {
      this.$refs.attendanceRef.open();
    },
  },
};
</script>
